package number_55;

public class Solution {
    public boolean canJump(int[] nums) {
        int n = nums.length;
        int step = 0;
        for (int i = n - 1; i >= 0; i--) {
            if (nums[i] < step) {
                step++;
            } else {
                step = 1;
            }
        }
        return step == 0 || step == 1;
    }
}
